package com.hdoit.ares.web.cust.modelconfig;

import com.hdoit.ares.web.cust.providers.AttentionStatusProvider;
import com.hdoit.ares.web.cust.providers.CustomerLevelProvider;
import com.tennetcn.component.attribute.DateTimeAttribute;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;
import com.tennetcn.web.cbase.providers.SexProvider;

/**
 * @author      chenghuan
 * @email       
 * @createtime  2017年10月27日 14:42:30
 * @comment
 */
public class CustomerConfig extends ModelMetadataAttributeConfiguration{
    public CustomerConfig(){
        this.setProperty("username")
            .hasAttribute(new DisplayNameAttribute("姓名"));

        this.setProperty("nickname")
            .hasAttribute(new DisplayNameAttribute("昵称"));

        this.setProperty("userIdentity")
            .hasAttribute(new DisplayNameAttribute("用户标识"));

        this.setProperty("idType")
            .hasAttribute(new DisplayNameAttribute("证件类型"));

        this.setProperty("idCode")
            .hasAttribute(new DisplayNameAttribute("证件号码"));

        this.setProperty("sex")
            .hasAttribute(new DisplayNameAttribute("性别"))
            .hasAttribute(new DropDownListAttribute(new SexProvider()));

        this.setProperty("phone")
            .hasAttribute(new DisplayNameAttribute("电话"));

        this.setProperty("email")
            .hasAttribute(new DisplayNameAttribute("邮箱"));

        this.setProperty("birthday")
            .hasAttribute(new DisplayNameAttribute("生日"))
            .hasAttribute(new DateTimeAttribute());

        this.setProperty("marryRelation")
            .hasAttribute(new DisplayNameAttribute("婚姻关系"));

        this.setProperty("orgCode")
            .hasAttribute(new DisplayNameAttribute("orgCode"));

        this.setProperty("referee")
            .hasAttribute(new DisplayNameAttribute("介绍人"));

        this.setProperty("region")
            .hasAttribute(new DisplayNameAttribute("地区"));

        this.setProperty("registDate")
            .hasAttribute(new DisplayNameAttribute("注册时间"))
            .hasAttribute(new DateTimeAttribute());

        this.setProperty("level")
            .hasAttribute(new DisplayNameAttribute("客户级别"))
            .hasAttribute(new DropDownListAttribute(new CustomerLevelProvider()));

        this.setProperty("picPath")
            .hasAttribute(new DisplayNameAttribute("图像地址"));

        this.setProperty("openId")
            .hasAttribute(new DisplayNameAttribute("openId"));

        this.setProperty("autonym")
            .hasAttribute(new DisplayNameAttribute("是否实名认证"));
        
        //补充
        this.setProperty("refereeIdentity")
            .hasAttribute(new DisplayNameAttribute("推荐人标识"));
        
        this.setProperty("attentionDate")
            .hasAttribute(new DisplayNameAttribute("关注时间"))
            .hasAttribute(new DateTimeAttribute());
        
        this.setProperty("firstGeneration")
            .hasAttribute(new DisplayNameAttribute("一代数"));
        
        this.setProperty("secondGeneration")
            .hasAttribute(new DisplayNameAttribute("二代数"));
        
        this.setProperty("firstVisitor")
            .hasAttribute(new DisplayNameAttribute("一游客数"));
        
        this.setProperty("secondVisitor")
            .hasAttribute(new DisplayNameAttribute("一游客数"));
    
        this.setProperty("firstVip")
            .hasAttribute(new DisplayNameAttribute("一代会员数"));
        
        this.setProperty("secondVip")
            .hasAttribute(new DisplayNameAttribute("二代会员数"));

        this.setProperty("firstMaker")
            .hasAttribute(new DisplayNameAttribute("一代初创数"));
        
        this.setProperty("secondMaker")
            .hasAttribute(new DisplayNameAttribute("二代初创数"));

        this.setProperty("firstHighMaker")
            .hasAttribute(new DisplayNameAttribute("一代高创数"));
        
        this.setProperty("secondHighMaker")
            .hasAttribute(new DisplayNameAttribute("二代高创数"));
        
        this.setProperty("attentionStatus")
            .hasAttribute(new DisplayNameAttribute("关注状态"))
            .hasAttribute(new DropDownListAttribute(new AttentionStatusProvider()));
        
        //customerInfoMore中的字段
        this.setProperty("customerInfoMore.school")
            .hasAttribute(new DisplayNameAttribute("学校"));
        
        this.setProperty("customerInfoMore.educationLevel")
            .hasAttribute(new DisplayNameAttribute("学历"));
        
        this.setProperty("customerInfoMore.nation")
            .hasAttribute(new DisplayNameAttribute("民族"));
        
        this.setProperty("customerInfoMore.political")
            .hasAttribute(new DisplayNameAttribute("政治面貌"));
    
        this.setProperty("customerInfoMore.postcode")
            .hasAttribute(new DisplayNameAttribute("邮政编码"));
        
    }
}